package source;

import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;

/**
 * This simple tag implements header.
 * 
 * @author Chen Lei
 *
 */
public class HeaderTag extends SimpleTagSupport {
	/**
	 * Rewrite doTag method to implement show header in .JSP
	 * 
	 *
	 */
	public void doTag() throws JspException, IOException {

			String outPrint = "<div class=\"header\">\r\n" + 
					"	     <div class=\"container\">\r\n" + 
					"	        <div class=\"row\">\r\n" + 
					"	           <div class=\"col-md-5\">\r\n" + 
					"	              <!-- Logo -->\r\n" + 
					"	              <div class=\"logo\">\r\n" + 
					"	                 <h1><a href=\"index.html\">Enterprise BBS</a></h1>\r\n" + 
					"	              </div>\r\n" + 
					"	           </div>\r\n" + 
					"	           <div class=\"col-md-5\">\r\n" + 
					"	              <div class=\"row\">\r\n" + 
					"	                <div class=\"col-lg-12\">\r\n" + 
					"	                  \r\n" + 
					"	                </div>\r\n" + 
					"	              </div>\r\n" + 
					"	           </div>\r\n" + 
					"	           <div class=\"col-md-2\">\r\n" + 
					"	              <div class=\"navbar navbar-inverse\" role=\"banner\">\r\n" + 
					"	                  <nav class=\"collapse navbar-collapse bs-navbar-collapse navbar-right\" role=\"navigation\">\r\n" + 
					"	                    <ul class=\"nav navbar-nav\">\r\n" + 
					"	                      <li class=\"dropdown\">\r\n" + 
					"	                        <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">My Account <b class=\"caret\"></b></a>\r\n" + 
					"	                        <ul class=\"dropdown-menu animated fadeInUp\">\r\n" + 
					"	                          <li><a href=\"#\">Profile</a></li>\r\n" + 
					"	                          <li><a href=\"#\">Logout</a></li>\r\n" + 
					"	                        </ul>\r\n" + 
					"	                      </li>\r\n" + 
					"	                    </ul>\r\n" + 
					"	                  </nav>\r\n" + 
					"	              </div>\r\n" + 
					"	           </div>\r\n" + 
					"	        </div>\r\n" + 
					"	     </div>\r\n" + 
					"	</div>";
			// 在页面上输出页眉
			getJspContext().getOut().write(outPrint);

	}
}
